{include file="Main/menu" /}
<form method="post">
    <div class="panel admin-panel" style="background: #fff">
        <div class="panel-head"><strong>{:lang('currency')['list']}</strong></div>
        <div class="padding border-bottom">
            <script>
            //city 参数和回调
            var pid="{:input('get.pid')}";
            var cid="{:input('get.cid')}";
            var aid="{:input('get.aid')}";
            var selectc = true;
            var selecta = true;
            function select_p(){
                return false;
            }
            function select_c(){
                return false;
            }
            function select_a(){
                location.href="?pid="+pid+"&cid="+cid+"&aid="+aid;
            }
        </script>
        <input type="button" class="button button-small checkall" name="checkall" checkfor="id" value="{:lang('currency')['all_select']}" onclick="Select_All()" />
        <a type="button" class="button button-small border-green" href="javascript:edit('__URL__/set_edit.html')" />{:lang('currency')['add']}</a>
        <a id="select_del" type="button" class="button button-small border-red" />{:lang('currency')['del']}</a>
    </div>
    <table class="am-table am-table-striped am-table-hover table-main">
        <tr>
            <th width="60">{:lang('label')['select']}</th>
            <th width="100">{:lang('label')['name']}</th>
            <th width="200">描述</th>
            <th width="100">{:lang('label')['handle']}</th>
        </tr>
        {volist name="data" id="express"}
        <tr>
            <td ><input type="checkbox" name="box" value="{$express.id}" /></td>
            <td style="line-height:40px">{$express.name}</td>
            <td style="line-height:40px;max-width: 200px">{$express.description}</td>
            <td style="line-height:40px">
                <a class="button border-blue button-little" href="javascript:edit('__URL__/set_edit.html?id={$express.id}')">编辑</a>
                <a class="button border-green button-little" href="javascript:set_edit('__URL__/set_relevance.html?id={$express.id}')">关联</a>
                <a class="button border-yellow button-little" href="__URL__/set_del.html?id={$express.id}&page={:input('get.page')}" onclick="if(confirm('删除？')){return true;}return false;">{:lang('currency')['del']}</a>
            </td>
        </tr>
        {/volist}
    </table>
</div>
</form>
<script>
    $('#select_del').click(function(){
        var str="";
        $("input:checkbox[name=box]:checked").each(function(){
            str+=$(this).val()+",";
        });
        if(str!=''){
            if(confirm('{:lang('currency')['del']}?')){
                location.href='__URL__/set_del.html?id='+str;
            }
        }
    });
    function edit(url) {
        layer.open({
            type:2,
            title:' ',
            area: ['80%', '90%'],
            content:url
        })
    }
    function set_edit(url) {
        layer.open({
            type:2,
            title:'',
            area: ['450px', '208px'],
            content:url
        })
    }
</script>
{include file="Main/menu_footer" /}